﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace UniRx
{
	// Token: 0x02000406 RID: 1030
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct CollectionRemoveEvent<T> : IEquatable<CollectionRemoveEvent<T>>
	{
		// Token: 0x0600150F RID: 5391 RVA: 0x0005E8D1 File Offset: 0x0005CCD1
		public CollectionRemoveEvent(int index, T value)
		{
			this = default(CollectionRemoveEvent<T>);
			this.Index = index;
			this.Value = value;
		}

		// Token: 0x1700018C RID: 396
		// (get) Token: 0x06001510 RID: 5392 RVA: 0x0005E8E8 File Offset: 0x0005CCE8
		// (set) Token: 0x06001511 RID: 5393 RVA: 0x0005E8F0 File Offset: 0x0005CCF0
		public int Index { get; private set; }

		// Token: 0x1700018D RID: 397
		// (get) Token: 0x06001512 RID: 5394 RVA: 0x0005E8F9 File Offset: 0x0005CCF9
		// (set) Token: 0x06001513 RID: 5395 RVA: 0x0005E901 File Offset: 0x0005CD01
		public T Value { get; private set; }

		// Token: 0x06001514 RID: 5396 RVA: 0x0005E90A File Offset: 0x0005CD0A
		public override string ToString()
		{
			return string.Format("Index:{0} Value:{1}", this.Index, this.Value);
		}

		// Token: 0x06001515 RID: 5397 RVA: 0x0005E92C File Offset: 0x0005CD2C
		public override int GetHashCode()
		{
			return this.Index.GetHashCode() ^ EqualityComparer<T>.Default.GetHashCode(this.Value) << 2;
		}

		// Token: 0x06001516 RID: 5398 RVA: 0x0005E960 File Offset: 0x0005CD60
		public bool Equals(CollectionRemoveEvent<T> other)
		{
			return this.Index.Equals(other.Index) && EqualityComparer<T>.Default.Equals(this.Value, other.Value);
		}
	}
}
